{{template "base.html" .}}

{{define "index"}}


<table class="table table-bordered">
    <p><a href="/hero/add" class="btn btn-primary">添加英雄</a></p>
    <tr>
        <th>编号</th>
        <th>英雄名称</th>
        <th>职业</th>
    </tr>

    {{range $hero := .heros}}
    <tr>
        <td>{{$hero.Hid}}</td>
        <td>{{$hero.Name}}</td>
        <td>{{$hero.Job}}</td>
    </tr>
    {{end}}

</table>
{{end}}